<%-- 
    Document   : lichsumuahang
    Created on : Dec 4, 2011, 4:14:35 PM
    Author     : BlueZky
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<link rel="stylesheet" type="text/css" href="styles/userstyles.css" />
<link rel="stylesheet" type="text/css" href="styles/simple.css" />
<!DOCTYPE html>


<div class="utitle" style="margin-top: 20px;"></div>
<div class="box">
    <c:if test="${message ne null}">
        <div class="error">${message}</div>
    </c:if>
    <table class="utable" cellspacing="0px" cellpadding="10px" style="width: 100%;margin:auto;" >
        <tr>
            <th style="width:30px;">STT</th>
            <th style="width:110px;">Mã số hóa đơn</td>
            <th style="width:110px;">Thành tiền</th>
            <th style="width:100px;">Ngày đặt hàng</th>
            <th style="width:100px;">Ngày giao hàng</th>
            <th style="width:100px;" colspan="2" >Trạng thái</th>

        </tr>
        <c:forEach items="${lichSu}" var="item" varStatus="status">
            <tr>
                <td>${status.index + 1}</td>
                <td>${item.mahd}
                    <a href="lichsumuahang.htm?a=d&pid=${item.mahd}">(Chi tiết)</a>
                </td>
                <td><b>${item.tongtien} $</b></td>
                <td><fmt:formatDate pattern="dd/MM/yyyy"  value="${item.ngaydh}"/></td>
                <td><fmt:formatDate pattern="dd/MM/yyyy"  value="${item.ngaygh}"/></td>
                <td>${item.tinhtrang.ten}</td>
                <td><c:if test="${item.tinhtrang.ma eq 7}">
                        <a href="lichsumuahang.htm?a=e&pid=${item.mahd}" style="border:none; text-decoration: none">
                            <img src="images/edit.png" alt="" align="middle" width="24px"/>Sửa
                        </a>
                        | <a href="lichsumuahang.htm?a=c&pid=${item.mahd}" style="border:none; text-decoration: none">
                            <img src="images/delete.png" alt="" align="middle" width="24px"/>Hủy
                        </a>
                    </c:if></td>
            </tr>
        </c:forEach>
    </table>
</div>
